package atom.core3.spring.servlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

import org.apache.log4j.Logger;

import atom.core0.util.StringUtil;
import atom.core3.spring.util.SpringContext;






public class DynamicLoadBeanServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
	private static Logger log = Logger.getLogger(DynamicLoadBeanServlet.class);
	public void init() throws ServletException {
		super.init();
		
        DynamicLoadBean dynamicBeanLoad =(DynamicLoadBean)SpringContext.getBean("dynamicLoadBean");  
		String classPathFile = getInitParameter("filename");	
		if(StringUtil.isEmpty(classPathFile))
			log.info("filename是空,DynamicLoadBeanServlet没有动态加载bean");
  
        dynamicBeanLoad.loadBean(classPathFile);  		
	}

	
}

